package cn.com.ahao.job.jobhandler;

import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

@Component
public class NacosXxlJob {

    @Autowired
    private RestTemplate restTemplate;

    @XxlJob("nacosJobHandler")
    public void nacosJobHandler() throws Exception {
        restTemplate.getForObject("http://nacos-demo/nacosJobHello", void.class);
    }

}
